import tensorflow as tf

# 变量定义
var1 = tf.Variable(2)
var2 = tf.Variable(3)

var3 = tf.Variable([[1, 2]])
var4 = tf.Variable([[4], [2]])

# result 操作定义
result = tf.divide(var1, var2)
result2 = tf.multiply(var3, var4)

if __name__ == "__main__":
    # 变量初始化操作 op
    init = tf.global_variables_initializer()
    with tf.Session() as session:
        # 变量初始化
        session.run(init)
        # result 运行
        print(session.run([result, result2]))
